package com.zqh.myfmmall.clients;

import com.zqh.myfmmall.fallback.ProductSkuCUDClientFallback;
import com.zqh.myfmmall.result.Result;
import com.zqh.myfmmall.rowbeans.entity.ProductSku;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description :
 * @Author :kono淇杭哒、
 * @Create 2022-02-23 22:34
 */
@FeignClient(value = "product-sku-cud",fallbackFactory = ProductSkuCUDClientFallback.class)
public interface ProductSkuCUDClient{
    @PostMapping("productSku/create")
    Result add(@RequestBody ProductSku productSku);

    @PutMapping("productSku/update")
    Result update(@RequestBody ProductSku productSku);

    @PostMapping("productSku/updateBatch")
    Result updateBatch(@RequestBody List<ProductSku> productSkus);

    /*@PutMapping("productSku/updateBatch")
    Result updateBatch(@RequestBody String productSkusJsonString);*/

    @PostMapping("productSku/delete")
    Result delete(@RequestBody ArrayList<String> ids);
}
